#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
enum
{
	IDFlag_MIDDLE = 0,
	IDFlag_FRONT = 1 << 0,
	IDFlag_BACK = 1 << 1,
	IDFlag_LEFT = 1 << 2,
	IDFlag_RIGHT = 1 << 3,
	IDFlag_TOP = 1 << 4,
	IDFlag_BOTTOM = 1 << 5,
};
class Cube : public scene::ISceneNode
{
public:
	Cube(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, f32 len);
	virtual ~Cube(void);
public:
	virtual void OnRegisterSceneNode();
	virtual void render();
	virtual bool isReadOnlyMaterials() const { return false; };
	virtual const core::aabbox3d<f32>& getBoundingBox() const;
	virtual u32 getMaterialCount() const;
	virtual video::SMaterial& getMaterial(u32 i);
	virtual void OnAnimate(u32 timeMs);
	bool hasStop();
	virtual void setParent(ISceneNode*);

private:
	IMesh* mesh;
	f32 length;
};
